main = print ( sum (filter (\x -> any (\y -> (x `mod` y) == 0) [3, 5]) [1..999]) )

